package model

import (
	"time"

	"gddgame.cc/galaxy/common/dsl/game/attr"
	"gddgame.cc/galaxy/common/namespaces/cooperate/structure"
)

const MapNodeName = "map_node"

type MapNode struct {
	Id       int                      `json:"id" orm:"auto" sql:"INT"`
	Name     string                   `json:"name" sql:"VARCHAR"`
	MapId    int                      `json:"map_id" sql:"INT"`
	X        int                      `json:"x" sql:"INT"`
	Y        int                      `json:"y" sql:"INT"`
	Version  int                      `json:"version" sql:"INT"`
	DataType structure.PublicDataType `json:"data_type" sql:"TINYINT"`
	Mode     byte                     `json:"mode" sql:"TINYINT"`
	Status   bool                     `json:"status" sql:"TINYINT"`

	AttrEffect attr.AttrEffectSlice `json:"attrEffect" sql:"JSON"`

	UpdateTime *time.Time `json:"update_time" orm:"updateTime" sql:"DATETIME"`
}
